package action;

import java.util.List;

import dao.DaoFactory;
import dao.UserDao;

import entity.User;

public class ListUserAction {
	private List<User> users;

	public String execute(){
		UserDao dao = DaoFactory.getInstance(UserDao.class);
		try {
			users=dao.findAll();
			return "listUser";
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
	
	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
	
}
